package api;

/**
 * TaskBase is an abstract class which enhances the Task interface
 * to include information such as taskId etc.
 * 
 * @author Mayuri Karra, Bing Wei
 *
 */
public abstract class TaskBase implements Task{
	private static final long serialVersionUID = 1L;

	long taskId; /* task identifier */	
	String inputFileName; /* input file for this task */
	String outputFileName;	/* output file for this task */
	int type; /* type of the task */

	
	public TaskBase(String inputFile, String outputFile){
		this.inputFileName = inputFile;
		this.outputFileName = outputFile;
		taskId = 0;
	}
	
	/**
	 * getter function for type of the task
	 * @return type of task
	 */

	public int getType() {
		return type;
	}

	/**
	 * getter function for input file name
	 * @return input file name
	 */
	public String getInputFileName() {
		return inputFileName;
	}


	/**
	 * getter function for output file name
	 * @return output file name
	 */

	public String getOutputFileName() {
		return outputFileName;
	}


	/**
	 * setter function for input file name
	 */
	public void setInputFileName(String inputFileName) {
		this.inputFileName = inputFileName;
	}

	/**
	 * setter function for output file name
	 */

	public void setOutputFileName(String outputFileName) {
		this.outputFileName = outputFileName;
	}

	/**
	 * getter function for task id
	 * @return task id
	 */
	
	public long getTaskId() {
		return taskId;
	}

	/**
	 * setter function for task id
	 */

	public void setTaskId(long taskId) {
		this.taskId = taskId;
	}

	/*
	@Override
	public List<MapperResult> map(Object key, Object value){
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public  ReducerResult reduce(Object key, List<Object> values) {
		// TODO Auto-generated method stub
		return null;
	}
   */

}
